mui.init()
//获取本地信息
var my_phone = localStorage.getItem("my_phone");
var user_id = localStorage.getItem("user_id");

function findIntegral(transaction_id) {
	mui.ajax(integral_url + '/findIntegral', {
		data: {
			"id": transaction_id,
			"userId": user_id
		},
		dataType: 'json', //服务器返回json格式数据
		type: 'post', //HTTP请求类型
		timeout: 10000, //超时时间设置为10秒
		headers: {
			'Content-Type': 'application/json'
		},
		success: function(data) {
			$("#transaction_type").text(data.operatioMsg);
			$("#integral_type").text(data.integrType);
			$("#amount").text(data.number);
			$("#transation_time").text(data.updateTime.substr(0, 16));

		},
		error: function(xhr, type, errorThrown) { //异常处理；
			console.log(type);
		}
	});
}

window.onload = function() {
	mui.plusReady(function() {
		var self = plus.webview.currentWebview();
		var transaction_id = self.transaction_id;
		findIntegral(transaction_id);
	})
}